package tester;

/**
 * We use this class to wrap the fields we expect to undergo some sort of side
 * effect. We can almost call this a mini check-expect: <li>
 * "check-expect this field to equal this value".
 * 
 * @author Weston Jossey
 * @since December 12 2008
 * @version 1.0
 * 
 */
public class EffectField {
	private final String name;
	private final Object value;
	private final String type;
	
	/**
	 * 
	 * @param name
	 * @param value
	 * @param type
	 */
	public EffectField(String name, Object value, String type){
		this.name = name;
		this.value = value;
		this.type = type;
	}
	
	/**
	 * Effect Field constructor. Takes in the name of the field as a string, and
	 * the value of variable.
	 * 
	 * @param name
	 *            Name of the field as a String
	 * @param value
	 *            Expected value of the field after the side effect has taken
	 *            place
	 */
	public EffectField(String name, Object value) {
		this.name = name;
		this.value = value;
		this.type = "";
	}

	/**
	 * Get the name of the variable.
	 * 
	 * @return The name of the field
	 */
	public String getName() {
		return name;
	}

	/**
	 * Get the value of the variable.
	 * 
	 * @return The value of the variable
	 */
	public Object getValue() {
		return value;
	}
	
	public String getType(){
		return type;
	}

}
